package com.device.entity;

import com.fasterxml.jackson.annotation.JsonProperty;

public class TotalConfig {
    @JsonProperty("serialConfig")
    private SerialPortConfig serialPortConfig;
    private PollingConfig pollingConfig;
    private NetworkConfig networkConfig;

    public TotalConfig() {}

    public TotalConfig(SerialPortConfig serialPortConfig, PollingConfig pollingConfig, NetworkConfig networkConfig) {
        this.serialPortConfig = serialPortConfig;
        this.pollingConfig = pollingConfig;
        this.networkConfig = networkConfig;
    }

    @Override
    public String toString() {
        String sb = "[serialPortConfig]" + "\n" + this.serialPortConfig.toString() + "\n" +
                "[pollingConfig]" + "\n" + this.pollingConfig.toString() + "\n" +
                "[networkConfig]" + "\n" + this.networkConfig.toString() + "\n";

        return sb;
    }

    public SerialPortConfig getSerialPortConfig() {
        return serialPortConfig;
    }

    public void setSerialPortConfig(SerialPortConfig serialPortConfig) {
        this.serialPortConfig = serialPortConfig;
    }

    public PollingConfig getPollingConfig() {
        return pollingConfig;
    }

    public void setPollingConfig(PollingConfig pollingConfig) {
        this.pollingConfig = pollingConfig;
    }

    public NetworkConfig getNetworkConfig() {
        return networkConfig;
    }

    public void setNetworkConfig(NetworkConfig networkConfig) {
        this.networkConfig = networkConfig;
    }
}
